home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / ToolUtils.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.6 KB  |  163 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        ToolUtils.p
  3.  
  4.      Contains:    Toolbox Utilities Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT ToolUtils;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __TOOLUTILS__}
  27. {$SETC __TOOLUTILS__ := 1}
  28.  
  29. {$I+}
  30. {$SETC ToolUtilsIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __OSUTILS__}
  37. {$I OSUtils.p}
  38. {$ENDC}
  39.  
  40. {$IFC OLDROUTINELOCATIONS }
  41. {$IFC UNDEFINED __FIXMATH__}
  42. {$I FixMath.p}
  43. {$ENDC}
  44. {$IFC UNDEFINED __ICONS__}
  45. {$I Icons.p}
  46. {$ENDC}
  47. {$IFC UNDEFINED __QUICKDRAW__}
  48. {$I Quickdraw.p}
  49. {$ENDC}
  50. {$IFC UNDEFINED __TEXTUTILS__}
  51. {$I TextUtils.p}
  52. {$ENDC}
  53. {$ENDC}  {OLDROUTINELOCATIONS}
  54.  
  55.  
  56. {$PUSH}
  57. {$ALIGN MAC68K}
  58. {$LibExport+}
  59.  
  60.  
  61. {
  62. ————————————————————————————————————————————————————————————————————————————————————
  63.     Note: 
  64.     
  65.     The following routines that used to be in this header file, have moved to
  66.     more appropriate headers.  If OLDROUTINELOCATIONS is 0, then you will have
  67.     to include the headers below to use the following functions.
  68.     
  69.         FixMath.h:        FixMul
  70.                         FixRatio
  71.                         FixRound
  72.         
  73.         Icons.h:          GetIcon
  74.                         PlotIcon
  75.                         
  76.         Quickdraw.h:    AngleFromSlope
  77.                         DeltaPoint
  78.                         GetCursor
  79.                         GetIndPattern
  80.                         GetPattern
  81.                         GetPicture
  82.                         PackBits
  83.                         ScreenRes
  84.                         ShieldCursor
  85.                         SlopeFromAngle
  86.                         UnpackBits
  87.                         
  88.         TextUtils.h:    Munger
  89.                         GetIndString
  90.                         GetString
  91.                         NewString
  92.                         SetString
  93. ————————————————————————————————————————————————————————————————————————————————————
  94. }
  95.  
  96.  
  97. FUNCTION BitTst(bytePtr: UNIV Ptr; bitNum: LONGINT): BOOLEAN;
  98.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  99.     INLINE $A85D;
  100.     {$ENDC}
  101. PROCEDURE BitSet(bytePtr: UNIV Ptr; bitNum: LONGINT);
  102.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  103.     INLINE $A85E;
  104.     {$ENDC}
  105. PROCEDURE BitClr(bytePtr: UNIV Ptr; bitNum: LONGINT);
  106.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  107.     INLINE $A85F;
  108.     {$ENDC}
  109. FUNCTION BitAnd(value1: LONGINT; value2: LONGINT): LONGINT;
  110.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  111.     INLINE $A858;
  112.     {$ENDC}
  113. FUNCTION BitOr(value1: LONGINT; value2: LONGINT): LONGINT;
  114.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  115.     INLINE $A85B;
  116.     {$ENDC}
  117. FUNCTION BitXor(value1: LONGINT; value2: LONGINT): LONGINT;
  118.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  119.     INLINE $A859;
  120.     {$ENDC}
  121. FUNCTION BitNot(value: LONGINT): LONGINT;
  122.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  123.     INLINE $A85A;
  124.     {$ENDC}
  125. FUNCTION BitShift(value: LONGINT; count: INTEGER): LONGINT;
  126.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  127.     INLINE $A85C;
  128.     {$ENDC}
  129. {$IFC TARGET_CPU_68K }
  130.  
  131. TYPE
  132.     Int64BitPtr = ^Int64Bit;
  133.     Int64Bit = RECORD
  134.         hiLong:                    SInt32;
  135.         loLong:                    UInt32;
  136.     END;
  137.  
  138. PROCEDURE LongMul(a: LONGINT; b: LONGINT; VAR result: Int64Bit);
  139.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  140.     INLINE $A867;
  141.     {$ENDC}
  142. {$ENDC}  {TARGET_CPU_68K}
  143.  
  144. FUNCTION HiWord(x: LONGINT): INTEGER;
  145.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  146.     INLINE $A86A;
  147.     {$ENDC}
  148. FUNCTION LoWord(x: LONGINT): INTEGER;
  149.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  150.     INLINE $A86B;
  151.     {$ENDC}
  152.  
  153. {$ALIGN RESET}
  154. {$POP}
  155.  
  156. {$SETC UsingIncludes := ToolUtilsIncludes}
  157.  
  158. {$ENDC} {__TOOLUTILS__}
  159.  
  160. {$IFC NOT UsingIncludes}
  161.  END.
  162. {$ENDC}
  163.